package com.cgx.dao;

import com.cgx.entity.User.FriendRelation;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author chenguanxin
 * @date 2021-05-26 22:28
 */
@Repository
public interface FriendRelationDao extends MongoRepository<FriendRelation, String> {

    List<FriendRelation> findAllByMainUserIdAndFriendUserIdAndIsDelete(String mainUserId, String friendUserId, Integer isDelete);

    List<FriendRelation> findAllByRelationIdInAndIsDelete(List<String> relationIdList, Integer isDelete);

    List<FriendRelation> findAllBySessionIdInAndIsDelete(List<String> relationIdList, Integer isDelete);
}
